//package com.neshai.webapp.config;
//
//import org.springframework.http.HttpStatus;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.context.request.WebRequest;
//import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
//import org.springframework.http.converter.HttpMessageNotReadableException;
//
//@ControllerAdvice
//public class GlobalBodyNullExceptionHandler extends ResponseEntityExceptionHandler {
//
//    @ExceptionHandler(HttpMessageNotReadableException.class)
//    protected ResponseEntity<String > handleHttpMessageNotReadable(HttpMessageNotReadableException ex, WebRequest request) {
//        String errorMessage = "Required request body is missing or invalid";
//        return new ResponseEntity<>(errorMessage, HttpStatus.BAD_REQUEST);
//    }
//}